<!DOCTYPE html>
<html>
<head>
    <title>用户维护</title>
    <#include '../include/common.html'/>
    <script type="text/javascript" src="<@s.url '/statics/js/jquery.formautofill.js'/>"></script>
    <script type="text/javascript" src="<@s.url '/resources/user/js/main.js'/>"></script>
</head>
<body>

<div class="layui-btn-group">
    <button class="layui-btn" onclick="showAddWindow(1)"><i class="layui-icon">&#xe654;</i>增加</button>
    <button class="layui-btn layui-btn-warm" onclick="showAddWindow(2)"><i class="layui-icon">&#xe642;</i>修改</button>
    <button class="layui-btn  layui-btn-danger" onclick="del()"><i class="layui-icon">&#xe640;</i>删除</button>
    <button class="layui-btn" onclick="syncUser()" title="与Activiti用户同步"><i class="layui-icon">&#xe64c;</i>同步</button>
    <button class="layui-btn layui-btn-normal" onclick="javascript:table.reload('user-grid');" title="刷新"><i class="layui-icon">&#x1002;</i>刷新</button>

</div>
<table class="layui-table" lay-data="{height:'full-40',url:'user/list.json',page:true,id:'user-grid',request:{pageName:'pageNum',limitName:'pageSize'},response:{statusName:'status',statusCode:200,countName:'total',dataName:'list'},limit:20}" lay-filter="user-grid">
    <thead>
    <tr>
        <th lay-data="{checkbox:true}"></th>
        <th lay-data="{field:'userId',width:100}">用户名</th>
        <th lay-data="{field:'userName',width:100}">姓名</th>
        <th lay-data="{field:'userPassword',width:100}">密码</th>
        <th lay-data="{field:'userEmail',width:200}">邮箱</th>
        <th lay-data="{field:'positionMc',width:200}">职位</th>
    </tr>
    </thead>
</table>

<!--窗口表单-->
<form class="layui-form layui-form-pane window-form" id="addForm" action="add.do" style="display: none">
    <input type="text" name="id"class="hidden-input">
    <div class="layui-form-item">
        <label class="layui-form-label">用户名</label>
        <div class="layui-input-block">
            <input type="text" name="userId" required  lay-verify="required" placeholder="请输入用户名"class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">姓&nbsp;名</label>
        <div class="layui-input-block">
            <input type="text" name="userName" required  lay-verify="required" placeholder="请输入姓名"class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">密&nbsp;码</label>
        <div class="layui-input-block">
            <input type="text" name="userPassword" required  lay-verify="required" placeholder="请输入密码"class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">邮&nbsp;箱</label>
        <div class="layui-input-block">
            <input type="text" name="userEmail" required  lay-verify="required" placeholder="请输入邮箱"class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">职&nbsp;位</label>
        <div class="layui-input-block">
            <select name="positionId" lay-verify="required">
                <<option value="">--请选择--</option>
                <#list positionList as p>
                    <option value="${p.id}">${p.positionMc}</option>
                </#list>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="user-add-from">提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
</body>
</html>
